package com.a01_2021.thousandstimes.saas.controller;

import com.a01_2021.thousandstimes.saas.service.PostService;
import com.a01_2021.thousandstimes.utils.AjaxResponse;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: thousandstimes
 * @description:
 * @author: FRQ
 * @create: 2021-03-30 17:31
 **/
@RestController
@RequestMapping("/post")
public class PostController {
    @Autowired
    private PostService postService;

    //查询系统所有职位
    @PreAuthorize("hasAuthority('post-getPost')")
    @DS("master")
    @PostMapping("getPost")
    @ResponseBody
    public AjaxResponse getPost() {
        return postService.getPost();
    }

}
